home *** CD-ROM | disk | FTP | other *** search
/ Enigma Amiga Life 109 / EnigmaAmiga109CD.iso / dalla rivista / amiga.free / sorgenti vari / wolf3dmacsource.sit / Wolf3DMacSource / Data.c < prev    next >
C/C++ Source or Header  |  1994-09-22  |  6KB  |  138 lines

  1. #include "wolfdef.h"
  2.  
  3. /**********************************
  4.  
  5.     Global data used by Wolfenstein 3-D
  6.     
  7. **********************************/
  8.  
  9. Word tilemap[MAPSIZE][MAPSIZE];        /* Main tile map */
  10. Word ConnectCount;                    /* Number of valid interconnects */
  11. connect_t areaconnect[MAXDOORS];    /* Is this area mated with another? */
  12. Boolean    areabyplayer[MAXAREAS];        /* Which areas can I see into? */
  13. Word numstatics;                    /* Number of active static objects */
  14. static_t statics[MAXSTATICS];        /* Data for the static items */
  15. Word numdoors;                        /* Number of active door objects */
  16. door_t doors[MAXDOORS];                /* Data for the door items */
  17. Word nummissiles;                    /* Number of active missiles */
  18. missile_t missiles[MAXMISSILES];    /* Data for the missile items */
  19. Word numactors;                        /* Number of active actors */
  20. actor_t actors[MAXACTORS];            /* Data for the actors */
  21. unsigned char **GameShapes;            /* Pointer to the game shape array */
  22. Word difficulty;                    /* 0 = easy, 1= normal, 2=hard*/
  23. gametype_t gamestate;                /* Status of the game (Save game) */
  24. exit_t playstate;                    /* Current status of the game */
  25. Word killx,killy;                    /* X,Y of the thing that killed you! */
  26. Boolean madenoise;                    /* True when shooting or screaming*/
  27. Boolean playermoving;                /* Is the player in motion? */
  28. Boolean useheld;                    /* Holding down the use key? */
  29. Boolean selectheld;                    /* Weapon select held down? */
  30. Boolean attackheld;                    /* Attack button held down? */
  31. Boolean    buttonstate[NUMBUTTONS];    /* Current input */
  32. Word joystick1;                        /* Joystick value */
  33. int mousex;                            /* Mouse x movement */
  34. int mousey;                            /* Mouse y movement */
  35. int    mouseturn;                        /* Mouse turn movement */
  36. Word nextmap;                        /* Next map to warp to */
  37. Word facecount;                        /* Time to show a specific head */
  38. Word faceframe;                        /* Head pic to show */
  39. Word elevatorx,elevatory;            /* x,y of the elevator */
  40. Word firstframe;                    /* if non 0, the screen is still faded out */
  41. Word OldMapNum;                        /* Currently loaded map # */
  42. loadmap_t *MapPtr;                    /* Pointer to current loaded map */
  43. int clipshortangle;                    /* Angle for the left edge of the screen */
  44. int clipshortangle2;                /* clipshortangle * 2 */
  45. Word viewx;                            /* X coord of camera */
  46. Word viewy;                            /* Y coord of camera */
  47. fixed_t    viewsin;                    /* Base sine for viewing angle */
  48. fixed_t viewcos;                    /* Base cosine for viewing angle */
  49. Word normalangle;                    /* Normalized angle for view (NSEW) */
  50. Word centerangle;                    /* viewangle in fineangles*/
  51. Word centershort;                    /* viewangle in 64k angles*/
  52. Word topspritescale;                /* Scale of topmost sprite */
  53. Word topspritenum;                    /* Shape of topmost sprite */
  54. Word xscale[1024];    /* Scale factor for width of the screen */
  55. Word numvisspr;                /* Number of valid visible sprites */
  56. vissprite_t    vissprites[MAXVISSPRITES];    /* Buffer for sprite records */
  57. Word xevents[MAXVISSPRITES]; /* Scale events for sprite sort */
  58. Word sortbuffer[MAXVISSPRITES];    /* mergesort requires an extra buffer*/
  59. Word *firstevent;            /* First event in sorted list */
  60. Boolean areavis[MAXAREAS];    /* Area visible */
  61. Word bspcoord[4];            /* Rect for the BSP search */
  62. Word TicCount;                /* Ticks since last screen draw */
  63. Word LastTicCount;            /* Tick value at start of render */
  64. Boolean IntermissionHack;        /* Hack for preventing double score drawing during intermission */
  65.  
  66. Word rw_maxtex;
  67. Word rw_mintex;
  68. LongWord rw_scalestep;
  69. Word rw_midpoint;
  70. Boolean rw_downside;
  71. int rw_centerangle;
  72. Byte *rw_texture;
  73. LongWord rw_scale;
  74. Byte *ArtData[64];
  75. void *SpriteArray[S_LASTONE];
  76. Word MacVidSize = -1;
  77. Word SlowDown = 1;            /* Force the game to 15 hz */
  78. Word MouseEnabled = 0;        /* Allow mouse control */
  79. Word GameViewSize = 0;        /* Size of the game screen */
  80. Word NoWeaponDraw=1;            /* Flag to not draw the weapon on the screen */
  81. maplist_t *MapListPtr;        /* Pointer to map info record */
  82. unsigned short *SongListPtr;    /* Pointer to song list record */
  83. unsigned short *WallListPtr;    /* Pointer to wall list record */
  84. Word MaxScaler = 1;            /* Maximum number of VALID scalers */
  85. Boolean ShowPush;            /* Cheat for pushwalls */
  86. Byte textures[MAPSIZE*2+5][MAPSIZE];    /* Texture indexes */
  87. Word NaziSound[] = {SND_ESEE,SND_ESEE2,SND_ESEE3,SND_ESEE4};
  88.  
  89. classinfo_t    classinfo[] = {    /* Info for all the bad guys */
  90.     {SND_ESEE,SND_EDIE,        /* Nazi */
  91.     ST_GRD_WLK1, ST_GRD_STND, ST_GRD_ATK1,ST_GRD_PAIN,ST_GRD_DIE,
  92.     100, 5, 0x0F, 6},
  93.     
  94.     {SND_ESEE,SND_EDIE,    /* Blue guard */
  95.     ST_OFC_WLK1, ST_OFC_STND, ST_OFC_ATK1,ST_OFC_PAIN,ST_OFC_DIE,
  96.     400, 10, 0x01, 12},
  97.     
  98.     {SND_ESEE,SND_EDIE,    /* White officer */
  99.     ST_SS_WLK1, ST_SS_STND, ST_SS_ATK1,ST_SS_PAIN,ST_SS_DIE,
  100.     500, 6, 0x07, 25},
  101.     
  102.     {SND_DOGBARK,SND_DOGDIE,    /* Dog */
  103.     ST_DOG_WLK1,ST_DOG_STND,ST_DOG_ATK1,ST_DOG_WLK1,ST_DOG_DIE,
  104.     200, 9, 0x07, 1},
  105.     
  106.     {SND_NOSOUND,SND_EDIE,        /* Mutant */
  107.     ST_MUTANT_WLK1, ST_MUTANT_STND, ST_MUTANT_ATK1,ST_MUTANT_PAIN,ST_MUTANT_DIE,
  108.     400, 7, 0x01, 18},
  109.     
  110.     {SND_GUTEN,SND_EDIE,            /* Hans */
  111.     ST_HANS_WLK1, ST_HANS_STND, ST_HANS_ATK1,ST_GRD_STND,ST_HANS_DIE,
  112.     5000,7, 0x01, 250},
  113.     
  114.     {SND_SHITHEAD,SND_EDIE,            /* Dr. Schabbs */
  115.     ST_SCHABBS_WLK1, ST_SCHABBS_STND, ST_SCHABBS_ATK1,ST_GRD_STND,ST_SCHABBS_DIE,
  116.     5000, 5,0x01, 350},
  117.     
  118.     {SND_GUTEN,SND_EDIE,            /* Trans */
  119.     ST_TRANS_WLK1, ST_TRANS_STND, ST_TRANS_ATK1,ST_GRD_STND,ST_TRANS_DIE,
  120.     5000, 7,0x01, 300},
  121.     
  122.     {SND_DOGBARK,SND_EDIE,        /* Uber knight */
  123.     ST_UBER_WLK1, ST_UBER_STND, ST_UBER_ATK1,ST_GRD_STND,ST_UBER_DIE,
  124.     5000, 8,0x01, 400},
  125.     
  126.     {SND_COMEHERE,SND_EDIE,            /* Dark knight */
  127.     ST_DKNIGHT_WLK1, ST_DKNIGHT_STND, ST_DKNIGHT_ATK1,ST_GRD_STND,ST_DKNIGHT_DIE,
  128.     5000, 7,0x01, 450},
  129.     
  130.     {SND_SHIT,SND_EDIE,            /* Mechahitler */
  131.     ST_MHITLER_WLK1, ST_MHITLER_STND, ST_MHITLER_ATK1,ST_GRD_STND, ST_HITLER_DIE,
  132.     5000, 7,0x01, 500},
  133.     
  134.     {SND_HITLERSEE,SND_EDIE,            /* Hitler */
  135.     ST_HITLER_WLK1, ST_MHITLER_STND, ST_HITLER_ATK1,ST_GRD_STND,ST_HITLER_DIE,
  136.     5000, 8,0x01, 500},
  137. };
  138.